﻿<phone:PhoneApplicationPage 
    x:Class="NGA.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:sys="clr-namespace:System;assembly=mscorlib"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:data="clr-namespace:NGA"  
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="696"
    FontFamily="{StaticResource PhoneFontFamilySemiLight}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="True">

    <toolkit:TransitionService.NavigationInTransition>
        <toolkit:NavigationInTransition>
            <toolkit:NavigationInTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardIn"/>
            </toolkit:NavigationInTransition.Backward>
            <toolkit:NavigationInTransition.Forward>
                <toolkit:TurnstileTransition Mode="ForwardIn"/>
            </toolkit:NavigationInTransition.Forward>
        </toolkit:NavigationInTransition>
    </toolkit:TransitionService.NavigationInTransition>
    <toolkit:TransitionService.NavigationOutTransition>
        <toolkit:NavigationOutTransition>
            <toolkit:NavigationOutTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardOut"/>
            </toolkit:NavigationOutTransition.Backward>
            <toolkit:NavigationOutTransition.Forward>
                <toolkit:TurnstileTransition Mode="ForwardOut"/>
            </toolkit:NavigationOutTransition.Forward>
        </toolkit:NavigationOutTransition>
    </toolkit:TransitionService.NavigationOutTransition>

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Text="National Geography of Azeroth" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="PageTitle" Text="LOGIN" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <StackPanel x:Name="InputPanel" Grid.Row="1" Margin="12,0,12,0">
            <toolkit:ListPicker x:Name="LoginType" Header="Login with USERNAME/UID/EMAIL">
                <sys:String>USERNAME</sys:String>
                <sys:String>UID</sys:String>
                <sys:String>EMAIL</sys:String>
            </toolkit:ListPicker>
            <TextBox x:Name="_app_username" Text="{Binding UserName}" TextWrapping="Wrap" Width="456" HorizontalAlignment="Center" Height="72" InputScope="Default"/>
            <PasswordBox x:Name="_app_password" Password="{Binding Password}" Width="456" HorizontalAlignment="Center" />
            <ProgressBar x:Name="loginProgress" HorizontalAlignment="Center" VerticalAlignment="Bottom" IsIndeterminate="True" Margin="0,266,0,265" Width="456" Visibility="Collapsed"/>
        </StackPanel>

        <!--
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <toolkit:ListPicker Header="Username/UID/Email">
                <sys:String>Username</sys:String>
                <sys:String>UID</sys:String>
                <sys:String>Email</sys:String>
            </toolkit:ListPicker>
            <TextBox x:Name="_app_username" Text="{Binding UserName}" TextWrapping="Wrap" VerticalAlignment="Top" Height="72" Margin="0,90,0,0" InputScope="Default" RenderTransformOrigin="0.5,1.764"/>
            <PasswordBox x:Name="_app_password" Password="{Binding Password}" VerticalAlignment="Bottom" Margin="0,0,0,285"/>
            <ProgressBar x:Name="loginProgress" HorizontalAlignment="Center" VerticalAlignment="Center" IsIndeterminate="True" Margin="0,266,0,265" Width="456" Visibility="Collapsed"/>
        </Grid>
        -->
    </Grid>

    <!--Sample code showing usage of ApplicationBar-->
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton x:Name="_app_reset" IconUri="/Images/appbar.cancel.rest.png" Text="reset" Click="ApplicationBarIconButton_Reset_Click"/>
            <shell:ApplicationBarIconButton x:Name="_app_login" IconUri="/Images/appbar.check.rest.png" Text="log in" Click="ApplicationBarIconButton_Login_Click"/>
            <shell:ApplicationBar.MenuItems>
                <!--
            <shell:ApplicationBarMenuItem Text="MenuItem 1"/>
            <shell:ApplicationBarMenuItem Text="MenuItem 2"/>
    -->
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>